package main

import "fmt"

func main() {
	var a [3]int
	fmt.Println(a[0])
	fmt.Println(a[len(a)-1])

	for i, v := range a {
		fmt.Printf("%d %d\n", i, v)
	}

	q := [...]int{1, 2, 3}
	fmt.Printf("%T\n", q)

	var r [3]int = [3]int{1, 2}
	fmt.Println(r[2])

	var array [4][2]int
	array = [4][2]int{{10, 11}, {20, 21}, {30, 31}, {40, 41}}
	fmt.Println(array)
	array = [4][2]int{1: {20, 21}, 3: {40, 41}}
	fmt.Println(array)
	array = [4][2]int{1: {0: 20}, 3: {1: 41}}
	fmt.Println(array)
}
